from django.contrib import admin
from .models import Schedule, CourseTable


@admin.register(Schedule)
class ScheduleAdmin(admin.ModelAdmin):
    list_display = ['title', 'user', 'schedule_type', 'start_time', 'end_time', 'is_recurring']
    list_filter = ['schedule_type', 'is_recurring', 'start_time']
    search_fields = ['title', 'description', 'location']


@admin.register(CourseTable)
class CourseTableAdmin(admin.ModelAdmin):
    list_display = ['course_name', 'user', 'teacher', 'day_of_week', 'start_time', 'semester']
    list_filter = ['day_of_week', 'semester']
    search_fields = ['course_name', 'teacher', 'location']
